package edu.sctu.wujiayi.month06.day20150614.FilePractice;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * Created by user11 on 2015/6/14.
 */
public class InputStream {

    public static void main(String[] args) throws IOException {

        FileInputStream instream = new FileInputStream("D://nath//sherlock.txt");

        FileOutputStream outstream = new FileOutputStream("D://nath//sherlock00.txt");

        byte b[] = new byte[1024];

        int code=0;
        int code1=0;


        try {
            while ((code = instream.read()) != -1){

                code1+=code;

                System.out.println();

                outstream.write(code);

            }
            System.out.println(code1);
        }catch (Exception e){
            System.out.println("EOORO");
        }




   }


}
